#ifndef NE_STL_INCLUDE_PLANTFORM_H
#define NE_STL_INCLUDE_PLANTFORM_H

#if defined(ANDROID)
#define NE_STL_OS_ANDROID 1
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#define NE_STL_OS_IOS 1
#else
#define NE_STL_OS_MACOSX 1
#endif
#elif defined(__linux__)
#define NE_STL_OS_LINUX 1
#include <unistd.h>
#elif defined(_WIN32)
#define NE_STL_OS_WIN 1
#elif defined(__Fuchsia__)
#define NE_STL_OS_FUCHSIA 1
#elif defined(__FreeBSD__)
#define NE_STL_OS_FREEBSD 1
#elif defined(__NetBSD__)
#define NE_STL_OS_NETBSD 1
#elif defined(__OpenBSD__)
#define NE_STL_OS_OPENBSD 1
#elif defined(__sun)
#define NE_STL_OS_SOLARIS 1
#elif defined(__QNXNTO__)
#define NE_STL_OS_QNX 1
#elif defined(_AIX)
#define NE_STL_OS_AIX 1
#elif defined(__asmjs__)
#define NE_STL_OS_ASMJS
#else
#error Please add support for your platform in build/build_config.h
#endif
#if defined(NE_STL_OS_FREEBSD) || defined(NE_STL_OS_NETBSD) || defined(NE_STL_OS_OPENBSD)
#define NE_STL_OS_BSD 1
#endif
#if defined(NE_STL_OS_AIX) || defined(NE_STL_OS_ANDROID) || defined(NE_STL_OS_ASMJS) || defined(NE_STL_OS_FREEBSD) || defined(NE_STL_OS_LINUX) || \
    defined(NE_STL_OS_MACOSX) || defined(NE_STL_OS_NACL) || defined(NE_STL_OS_NETBSD) || defined(NE_STL_OS_OPENBSD) || defined(NE_STL_OS_QNX) ||  \
    defined(NE_STL_OS_SOLARIS)
#define NE_STL_OS_POSIX 1
#endif

#if defined(_M_X64) || defined(__x86_64__)
#define NE_STL_ARC_HCPU_X86_FAMILY 1
#define NE_STL_ARC_HCPU_X86_64 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(_M_IX86) || defined(__i386__)
#define NE_STL_ARC_HCPU_X86_FAMILY 1
#define NE_STL_ARC_HCPU_X86 1
#define NE_STL_ARC_HCPU_32_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(__s390x__)
#define NE_STL_ARC_HCPU_S390_FAMILY 1
#define NE_STL_ARC_HCPU_S390X 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
#elif defined(__s390__)
#define NE_STL_ARC_HCPU_S390_FAMILY 1
#define NE_STL_ARC_HCPU_S390 1
#define NE_STL_ARC_HCPU_31_BITS 1
#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
#elif (defined(__PPC64__) || defined(__PPC__)) && defined(__BIG_ENDIAN__)
#define NE_STL_ARC_HCPU_PPC64_FAMILY 1
#define NE_STL_ARC_HCPU_PPC64 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
#elif defined(__PPC64__)
#define NE_STL_ARC_HCPU_PPC64_FAMILY 1
#define NE_STL_ARC_HCPU_PPC64 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(__ARMEL__)
#define NE_STL_ARC_HCPU_ARM_FAMILY 1
#define NE_STL_ARC_HCPU_ARMEL 1
#define NE_STL_ARC_HCPU_32_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(__aarch64__) || defined(_M_ARM64)
#define NE_STL_ARC_HCPU_ARM_FAMILY 1
#define NE_STL_ARC_HCPU_ARM64 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(__pnacl__) || defined(__asmjs__)
#define NE_STL_ARC_HCPU_32_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#elif defined(__MIPSEL__)
#if defined(__LP64__)
#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
#define NE_STL_ARC_HCPU_MIPS64EL 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#else
#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
#define NE_STL_ARC_HCPU_MIPSEL 1
#define NE_STL_ARC_HCPU_32_BITS 1
#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
#endif
#elif defined(__MIPSEB__)
#if defined(__LP64__)
#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
#define NE_STL_ARC_HCPU_MIPS64 1
#define NE_STL_ARC_HCPU_64_BITS 1
#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
#else
#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
#define NE_STL_ARC_HCPU_MIPS 1
#define NE_STL_ARC_HCPU_32_BITS 1
#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
#endif
#else
#error Please add support for your architecture in build/build_config.h
#endif

#if defined(__clang__)
#define NE_STL_USE_CLANG 1
#elif defined(__GNUC__)
#define NE_STL_USE_GCC 1
#elif defined(_MSC_VER)
#define NE_STL_USE_MSVC 1
#define NE_STL_ENABLE_WINXP 0
#endif

#if defined(NE_STL_USE_CLANG) || defined(NE_STL_USE_GCC)

#define NE_STL_CPP_STANDARD __cplusplus

#elif defined(NE_STL_USE_MSVC)

#define NE_STL_CPP_STANDARD _MSVC_LANG

#endif
#define NE_STL_STD_VER_11_No 201103L
#define NE_STL_STD_VER_14_No 201402L
#define NE_STL_STD_VER_17_No 201703L
#define NE_STL_STD_VER_20_No 202002L

#define NE_STL_CPP_STD_VER_11 11
#define NE_STL_CPP_STD_VER_14 14
#define NE_STL_CPP_STD_VER_17 17
#define NE_STL_CPP_STD_VER_20 20
#define NE_STL_CPP_STD_VER_21 21
#if NE_STL_CPP_STANDARD <= NE_STL_STD_VER_11_No
#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_11
#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_14_No
#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_14
#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_17_No
#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_17
#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_20_No
#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_20
#else
#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_21  // current year, or date of c++2b ratification
#endif
#endif  // !NE_STL_INCLUDE_PLANTFORM_H
